#include <iostream>
#include <string>
#include <vector>

using namespace std;

int GetDataThroughEnglish();
int IsNo(string no);
int GetNumericNo(string no);
int EnglishToNumber();
int AaddB();
int pow(int i,int j);

vector< vector<string> > str1Data;
vector<int> int1Data;
vector< vector<string> > str2Data;
vector<int> int2Data;

vector<string> tmpstr1Data;
vector<string> tmpstr2Data;

const string EnglishNumber[11] = {"zero","one","two","three","four","five","six","seven","eight","nine","ten"};
int main()
{	
	GetDataThroughEnglish();
	EnglishToNumber();
	AaddB();
	char s ;
	cin>>s;
	return 0;
}


int GetDataThroughEnglish()
{	
	while(true)
	{		
		string str1 = "";
		while(str1.compare("+") != 0)
		{
			cin>>str1;
			if (IsNo(str1) != 0)
			{
				return 0;
			}
			tmpstr1Data.push_back(str1);
		}
		tmpstr1Data.pop_back();

		string str2 = "";
		while(str2.compare("=") != 0)
		{
			cin>>str2;
			if (IsNo(str2) != 0)
			{
				return 0;
			}
			tmpstr2Data.push_back(str2);
		}
		tmpstr2Data.pop_back();

		if (tmpstr1Data.size()==1&&tmpstr1Data[0].compare(EnglishNumber[0])==0&&tmpstr2Data.size()==1&&tmpstr2Data[0].compare(EnglishNumber[0])==0)
		{
			break;
		}

		str1Data.push_back(tmpstr1Data);
		tmpstr1Data.clear();
		
		str2Data.push_back(tmpstr2Data);
		tmpstr2Data.clear();
		
	}
	return 1;

}

int EnglishToNumber()
{
	int ilen1 = str1Data.size();
	for (int i=0; i<ilen1; i++)
	{
		int ilen2 = str1Data[i].size();
		int ivalue = 0;
		for (int j=0; j<ilen2; j++)
		{
			ivalue+= GetNumericNo(str1Data[i][j])* pow(10,ilen2-j-1);
		}
		int1Data.push_back(ivalue);

		int ilen3 = str2Data[i].size();
		int jvalue = 0;
		for (int j=0; j<ilen3; j++)
		{
			jvalue+= GetNumericNo(str2Data[i][j])* pow(10,ilen3-j-1);
		}
		int2Data.push_back(jvalue);
	}
	return 1;
}
int IsNo(string no)
{
	for (int i=0; i<11; i++)
	{
		if (no.compare(EnglishNumber[i]) != 0)
		{
			return 0;
		}		
	}
	return 1;
}
int GetNumericNo(string no)
{
	int iCount = 0;
	while (no.compare(EnglishNumber[iCount]) != 0)
	{
		iCount++;
	}
	return iCount;
}
int AaddB()
{
	int ilen = int1Data.size();
	for (int i=0; i<ilen; i++)
	{
		cout<<int1Data[i]+int2Data[i]<<endl;
	}
	return 1;
}
int pow(int i,int j)
{
	int ipow = 1;
	for (int k=0; k<j; k++)
	{
		ipow *= i;
	}
	return ipow;
}